home *** CD-ROM | disk | FTP | other *** search
- /*
- #### # # # #
- # # # # # The FreeWare C library for
- # # ## ### # # # # ### RISC OS machines
- # # # # # # # # # # # ___________________________________
- # # #### ### ## # # # #
- # # # # # # # # # # Please refer to the accompanying
- #### ### #### # # ##### # ### documentation for conditions of use
- ________________________________________________________________________
-
- File: WimpSWIs.DLLPoll.c
- Author: Copyright © 1995 Julian Smith
- Version: 1.00 (15 Apr 1995)
- Purpose: Simple veneer function for Wimp_Poll which preserves the
- application starttime as required by Straylight's DLL
- system.
-
- These functions are only needed for the SDLS version of
- DeskLib.
- */
-
-
-
- #include "DeskLib:WimpSWIs.h"
- #include "DLLPollDefs.h"
-
-
- #if defined( _DeskLib_SDLS)
-
-
-
-
- os_error *Wimp_Poll3_DLL(
- event_pollmask mask,
- event_pollblock *event,
- void *pollword
- )
- {
- event->type = _dll_wimpPoll( mask, &event->data, 0, pollword);
-
- if (event->type > 256)
- return (os_error *) (int) event->type;
- /* cc 5 doesn't like casts from an enum directly to a pointer */
- else return NULL;
- }
-
-
- os_error *Wimp_PollIdle3_DLL(
- event_pollmask mask,
- event_pollblock *event,
- int earliest,
- void *pollword
- )
- {
- event->type = _dll_wimpPollIdle( mask, &event->data, earliest, pollword);
-
- if (event->type > 256)
- return (os_error *) (int) event->type;
- /* cc 5 doesn't like casts from an enum directly to a pointer */
- else return NULL;
- }
-
-
- /*
- Perhaps we could just have, in DeskLib:WimpSWIs.h
-
- extern event_type _dll_wimpPoll(
- event_pollmask mask, event_data *data, int idletime, void *pollword
- );
-
- #define Wimp_Poll3_DLL( mask, event, pollword) \
- ( \
- event->type = _dll_wimpPoll( mask, &event->data, 0, pollword) \
- , \
- ((event)->type<256) ? NULL : (void *) (event)->type \
- )
-
- This gives warning about no context in void vontext or something...
-
- */
-
-
-
- #else
- int Wimp_Poll__dummy;
- /*
- To stop cc complaining about 'no extern declaration in translation unit
- */
-
-
- #endif
-
-